<!--Page does not exist, taking off link because do not want to break with new page/controller action before demo
	<ul>
    <li>
        <a href="<?php echo $this->url(array('controller'=>'admin','action'=>'allinternships')) ?>">View Past Internships</a>
    </li>
</ul>-->
<h3>Internship requests for upcoming terms:</h3>
<table>
    <tr>
        <th>Position</th>
        <th>Term</th>
        <th>Positions Requested</th>
        <th>Positions Granted</th>
        <th>Accepted</th>
    </tr>
<?php if($this->positions):?>
    <?php foreach($this->positions as $pos): ?>
    <?php if(!$pos['ACCEPTED']):?>
    <tr>
		<td>
		<!--<?php echo $pos['PARTNERNAME']?><br/>-->
			<a href="
			<?php echo $this->url(array('controller'=>'admin','action'=>'viewinternreq','position'=>$pos['POSID'])); ?>
			"><?php echo $pos['NAME'] ?></a></td>
		<td><?php echo $pos['TERM'] ?></td>
		<td align="center"><?php echo $pos['POSITIONSREQUESTED'] ?></td>
		<td></td>
		<td></td>	
    </tr>
    <?php endif;?>
    <?php endforeach ?>
    <?php foreach($this->positions as $pos): ?>
    <?php if($pos['ACCEPTED']):?>
    <tr>
		<td>
			<a href="
			<?php echo $this->url(array('controller'=>'admin','action'=>'viewinternreq','position'=>$pos['POSID'])); ?>
			"><?php echo $pos['NAME'] ?></a></td>
		<td><?php echo $pos['TERM'] ?></td>
		<td align="center"><?php echo $pos['POSITIONSREQUESTED'] ?></td>
		<td align="center"><?php echo $pos['POSITIONSGRANTED'] ?></td>
		<td align="center"><?php echo ($pos['ACCEPTED']=='y')?'Accepted':'Denied'; ?></td>	
    </tr>
    <?php endif;?>
    <?php endforeach ?>
<?php endif; ?>
<?php if(!$this->positions):?>
    <tr></tr>
	<tr>
		<td colspan = "5" align="center">There are no open internship requests.</td>
	</tr>
<?php endif; ?>
</table>
